Optimal. Leaf size=87 \[ -\frac {a \log (\cos (c+d x))}{d}+\frac {a \sec (c+d x)}{d}-\frac {a \sec ^2(c+d x)}{d}-\frac {2 a \sec ^3(c+d x)}{3 d}+\frac {a \sec ^4(c+d x)}{4 d}+\frac {a \sec ^5(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3964, 90}
\begin {gather*} \frac {a \sec ^5(c+d x)}{5 d}+\frac {a \sec ^4(c+d x)}{4 d}-\frac {2 a \sec ^3(c+d x)}{3 d}-\frac {a \sec ^2(c+d x)}{d}+\frac {a \sec (c+d x)}{d}-\frac {a \log (\cos (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 90
Rule 3964
Rubi steps
\begin {align*} \int (a+a \sec (c+d x)) \tan ^5(c+d x) \, dx &=-\frac {\text {Subst}\left (\int \frac {(a-a x)^2 (a+a x)^3}{x^6} \, dx,x,\cos (c+d x)\right )}{a^4 d}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {a^5}{x^6}+\frac {a^5}{x^5}-\frac {2 a^5}{x^4}-\frac {2 a^5}{x^3}+\frac {a^5}{x^2}+\frac {a^5}{x}\right ) \, dx,x,\cos (c+d x)\right )}{a^4 d}\\ &=-\frac {a \log (\cos (c+d x))}{d}+\frac {a \sec (c+d x)}{d}-\frac {a \sec ^2(c+d x)}{d}-\frac {2 a \sec ^3(c+d x)}{3 d}+\frac {a \sec ^4(c+d x)}{4 d}+\frac {a \sec ^5(c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.31, size = 82, normalized size = 0.94 \begin {gather*} \frac {a \sec (c+d x)}{d}-\frac {2 a \sec ^3(c+d x)}{3 d}+\frac {a \sec ^5(c+d x)}{5 d}-\frac {a \left (4 \log (\cos (c+d x))+2 \tan ^2(c+d x)-\tan ^4(c+d x)\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 123, normalized size = 1.41
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\sin ^{6}\left (d x +c \right )}{5 \cos \left (d x +c \right )^{5}}-\frac {\sin ^{6}\left (d x +c \right )}{15 \cos \left (d x +c \right )^{3}}+\frac {\sin ^{6}\left (d x +c \right )}{5 \cos \left (d x +c \right )}+\frac {\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )}{5}\right )+a \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(123\) |
default | \(\frac {a \left (\frac {\sin ^{6}\left (d x +c \right )}{5 \cos \left (d x +c \right )^{5}}-\frac {\sin ^{6}\left (d x +c \right )}{15 \cos \left (d x +c \right )^{3}}+\frac {\sin ^{6}\left (d x +c \right )}{5 \cos \left (d x +c \right )}+\frac {\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )}{5}\right )+a \left (\frac {\left (\tan ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\tan ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(123\) |
risch | \(i a x +\frac {2 i a c}{d}+\frac {2 a \left (15 \,{\mathrm e}^{9 i \left (d x +c \right )}-30 \,{\mathrm e}^{8 i \left (d x +c \right )}+20 \,{\mathrm e}^{7 i \left (d x +c \right )}-60 \,{\mathrm e}^{6 i \left (d x +c \right )}+58 \,{\mathrm e}^{5 i \left (d x +c \right )}-60 \,{\mathrm e}^{4 i \left (d x +c \right )}+20 \,{\mathrm e}^{3 i \left (d x +c \right )}-30 \,{\mathrm e}^{2 i \left (d x +c \right )}+15 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(152\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 72, normalized size = 0.83 \begin {gather*} -\frac {60 \, a \log \left (\cos \left (d x + c\right )\right ) - \frac {60 \, a \cos \left (d x + c\right )^{4} - 60 \, a \cos \left (d x + c\right )^{3} - 40 \, a \cos \left (d x + c\right )^{2} + 15 \, a \cos \left (d x + c\right ) + 12 \, a}{\cos \left (d x + c\right )^{5}}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.54, size = 79, normalized size = 0.91 \begin {gather*} -\frac {60 \, a \cos \left (d x + c\right )^{5} \log \left (-\cos \left (d x + c\right )\right ) - 60 \, a \cos \left (d x + c\right )^{4} + 60 \, a \cos \left (d x + c\right )^{3} + 40 \, a \cos \left (d x + c\right )^{2} - 15 \, a \cos \left (d x + c\right ) - 12 \, a}{60 \, d \cos \left (d x + c\right )^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.52, size = 112, normalized size = 1.29 \begin {gather*} \begin {cases} \frac {a \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a \tan ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{5 d} + \frac {a \tan ^{4}{\left (c + d x \right )}}{4 d} - \frac {4 a \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{15 d} - \frac {a \tan ^{2}{\left (c + d x \right )}}{2 d} + \frac {8 a \sec {\left (c + d x \right )}}{15 d} & \text {for}\: d \neq 0 \\x \left (a \sec {\left (c \right )} + a\right ) \tan ^{5}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 201 vs.
\(2 (81) = 162\).
time = 1.81, size = 201, normalized size = 2.31 \begin {gather*} \frac {60 \, a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right ) - 60 \, a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right ) + \frac {201 \, a + \frac {1125 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {2610 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {1970 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {805 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {137 \, a {\left (\cos \left (d x + c\right ) - 1\right )}^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{{\left (\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}^{5}}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.73, size = 151, normalized size = 1.74 \begin {gather*} \frac {2\,a\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-10\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {62\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {22\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+\frac {16\,a}{15}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________